<html>
<head><meta charset="utf-8"><title>design meeting 2019.12.09 · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html">design meeting 2019.12.09</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="182987877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182987877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182987877">(Dec 09 2019 at 19:02)</a>:</h4>
<p>Hey <span class="user-group-mention" data-user-group-id="692">@WG-traits</span> =)</p>
<p>I don't have a dedicated topic for today's meeting, but what I was thinking would be useful was to try and "plot out" some of the big picture roadmap questions. I created a <a href="https://hackmd.io/J1QG2rwERAKdknM_qgrhMA" target="_blank" title="https://hackmd.io/J1QG2rwERAKdknM_qgrhMA">hackmd</a> and was starting to write stuff into it. I'd hoped to have this ready <em>before</em> this time slot but c'est la vie</p>



<a name="182988164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988164">(Dec 09 2019 at 19:05)</a>:</h4>
<p>also, I don't think we ever wrote up our notes from the last design meeting, where we talked about types, right?</p>



<a name="182988170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988170">(Dec 09 2019 at 19:05)</a>:</h4>
<p>I am around-ish. Enough to listen and respond to some comments (if we do talk about something), but not really enough to discuss in-depth</p>



<a name="182988183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988183">(Dec 09 2019 at 19:05)</a>:</h4>
<p>ok, I'm going to edit the hackmd and leave random things in this channel :P</p>



<a name="182988212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988212">(Dec 09 2019 at 19:05)</a>:</h4>
<p>I was also talking to <span class="user-mention" data-user-id="198819">@David Barsky</span> on Friday, who may have some time to pursue some of this work in January</p>



<a name="182988216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988216">(Dec 09 2019 at 19:05)</a>:</h4>
<p>That being said, I nominate we talk next week about the associated types problem</p>



<a name="182988268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988268">(Dec 09 2019 at 19:06)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/238" target="_blank" title="https://github.com/rust-lang/rust/issues/238">#238</a> I think</p>



<a name="182988280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988280">(Dec 09 2019 at 19:06)</a>:</h4>
<p>yeah, that's probably a good idea</p>



<a name="182988292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988292">(Dec 09 2019 at 19:06)</a>:</h4>
<p>maybe I can add it to the calendar</p>



<a name="182988315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988315">(Dec 09 2019 at 19:06)</a>:</h4>
<p>I had some more time on the plane yesterday to play around with it more</p>



<a name="182988346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988346">(Dec 09 2019 at 19:07)</a>:</h4>
<p>I guess you mean <a href="https://github.com/rust-lang/chalk/issues/234" target="_blank" title="https://github.com/rust-lang/chalk/issues/234">https://github.com/rust-lang/chalk/issues/234</a></p>



<a name="182988358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988358">(Dec 09 2019 at 19:07)</a>:</h4>
<p>But there are some key questions that need to be discussed</p>



<a name="182988369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988369">(Dec 09 2019 at 19:07)</a>:</h4>
<p>Yes, that</p>



<a name="182988384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988384">(Dec 09 2019 at 19:07)</a>:</h4>
<p>Indeed, it's definitely a topic in the spirit I hope to use this meeting for more and more: one where the right answer is rather unclear</p>



<a name="182988456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988456">(Dec 09 2019 at 19:08)</a>:</h4>
<p>Maybe today, we can discuss/think about the rust-analyzer infinite loop problem?</p>



<a name="182988478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988478">(Dec 09 2019 at 19:08)</a>:</h4>
<p>Yes. I've thought about that and I think I know the strategy I would like to pursue</p>



<a name="182988490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988490">(Dec 09 2019 at 19:08)</a>:</h4>
<p>It actually fits some of the work we've been doing</p>



<a name="182988517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988517">(Dec 09 2019 at 19:08)</a>:</h4>
<p>In short, the idea is to separate <em>unification</em> (syntactic equality) from <em>type relation</em> (Rust type equality)</p>



<a name="182988546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988546">(Dec 09 2019 at 19:09)</a>:</h4>
<p>Today we conflate them and that is part of what is leading us into trouble here</p>



<a name="182988566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988566">(Dec 09 2019 at 19:09)</a>:</h4>
<p>You may recall that in past meetings I talked about a similar theme</p>



<a name="182988592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988592">(Dec 09 2019 at 19:09)</a>:</h4>
<p>Sounds like <a href="https://github.com/rust-lang/rust/issues/234" target="_blank" title="https://github.com/rust-lang/rust/issues/234">#234</a>?</p>



<a name="182988601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988601">(Dec 09 2019 at 19:09)</a>:</h4>
<p>Certainly related</p>



<a name="182988666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988666">(Dec 09 2019 at 19:10)</a>:</h4>
<p>When we were introducing the generic types, one of my goals was to take</p>



<a name="182988682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988682">(Dec 09 2019 at 19:10)</a>:</h4>
<p>clauses that include projection types</p>



<a name="182988685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988685">(Dec 09 2019 at 19:10)</a>:</h4>
<p>and compile them down</p>



<a name="182988692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988692">(Dec 09 2019 at 19:10)</a>:</h4>
<p>I probably talked about it in <a href="https://github.com/rust-lang/rust/issues/234" target="_blank" title="https://github.com/rust-lang/rust/issues/234">#234</a>, yeah</p>



<a name="182988745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988745">(Dec 09 2019 at 19:11)</a>:</h4>
<p>so e.g. </p>
<div class="codehilite"><pre><span></span>forall&lt;T&gt; {
    Foo(&lt;T as Iterator&gt;::Item: Blah&lt;T&gt;) :- ...
}
</pre></div>


<p>might become</p>
<div class="codehilite"><pre><span></span>forall&lt;T, U&gt; {
    Foo(U: Blah&lt;T&gt;) :- ProjectionEq(&lt;T as Iterator&gt;::Item -&gt; U), ...
}
</pre></div>



<a name="182988755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988755">(Dec 09 2019 at 19:11)</a>:</h4>
<p>That's somewhat the approach I've been taking playing around</p>



<a name="182988773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988773">(Dec 09 2019 at 19:11)</a>:</h4>
<p>I had that working but I stopped at some point because I realized there was a problem around higher-ranked things</p>



<a name="182988779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988779">(Dec 09 2019 at 19:11)</a>:</h4>
<p>but what I realized recently was that I was giving up too easily</p>



<a name="182988865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988865">(Dec 09 2019 at 19:12)</a>:</h4>
<p>in short when we are creating clauses (and goals) we can find all the cases where syntactic equality and Rust type equality diverge and compile them with a similar pattern:</p>



<a name="182988876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988876">(Dec 09 2019 at 19:12)</a>:</h4>
<p>introduce a variable + a clause that constraints the variable</p>



<a name="182988909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988909">(Dec 09 2019 at 19:12)</a>:</h4>
<p>On mobile,  so I can't link right now, but there was a couple tests that I found that are "ambiguous" now that seem like they should be unique</p>



<a name="182988917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988917">(Dec 09 2019 at 19:12)</a>:</h4>
<p>Will link later</p>



<a name="182988918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988918">(Dec 09 2019 at 19:12)</a>:</h4>
<p>this comes up in I think 3 cases:</p>
<ul>
<li>lifetime parameters</li>
<li>higher-ranked types (functions, dyn Traits)</li>
<li>projections</li>
</ul>



<a name="182988982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988982">(Dec 09 2019 at 19:13)</a>:</h4>
<p>the reason that I stumbled on this again <em>recently</em> is that I was trying to mock up the approach to region solving that I wanted to use, where chalk is responsible for handling higher-ranked lifetimes (cc <span class="user-mention" data-user-id="116118">@Matthew Jasper</span>, <span class="user-mention" data-user-id="116113">@lqd</span>)</p>



<a name="182988997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182988997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182988997">(Dec 09 2019 at 19:13)</a>:</h4>
<p>and to do <em>that</em> I found I really needed to separate out <em>syntactic</em> equality of lifetimes with <em>Rust equality</em></p>



<a name="182989111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989111">(Dec 09 2019 at 19:14)</a>:</h4>
<p>Can you elaborate on that?</p>



<a name="182989112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989112">(Dec 09 2019 at 19:14)</a>:</h4>
<p>e.g. I wanted to be able to write a transitive rule for lifetimes like so:</p>
<div class="codehilite"><pre><span></span>Outlives(A: C) :- Outlives(A: B), Outlives(B: C)
</pre></div>


<p>(the actual rule would be mildly different, but that's the idea)</p>



<a name="182989130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989130">(Dec 09 2019 at 19:15)</a>:</h4>
<blockquote>
<p>Can we elaborate on that?</p>
</blockquote>
<p>doing so :)</p>



<a name="182989181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989181">(Dec 09 2019 at 19:15)</a>:</h4>
<p>the idea being that if you had in your environment something like <code>'a : 'b</code> and <code>'b: 'c</code>, I'd like to be able to find "all the things that <code>'a</code> outlives in the environment")</p>



<a name="182989209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989209">(Dec 09 2019 at 19:15)</a>:</h4>
<p>but right now whenever you try to equate two lifetimes in chalk, it always succeeds, and it generates a "constraint" that propagates out that says that the outer context must prove they are equal</p>



<a name="182989263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989263">(Dec 09 2019 at 19:16)</a>:</h4>
<p>the idea is that chalk can't solve all of those constraints itself, it <em>generates</em> constraints that are fed to the borrow checker later</p>



<a name="182989320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989320">(Dec 09 2019 at 19:16)</a>:</h4>
<p>(the idea I am exploring around higher-ranked lifetimes is basically saying: actually chalk <em>can</em> figure this out for higher-ranked cases like <code>forall&lt;'a&gt; { ... }</code>, precisely because in that case we're not supposed to assume anything other than what assumptions we've been explicitly given)</p>



<a name="182989349"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989349" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989349">(Dec 09 2019 at 19:17)</a>:</h4>
<p>ordinarily I'd write some of this logic in Rust code</p>



<a name="182989376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989376">(Dec 09 2019 at 19:17)</a>:</h4>
<p>but I wanted to express it in the trait solver</p>



<a name="182989399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989399">(Dec 09 2019 at 19:17)</a>:</h4>
<p>and right now it can't because it's always treating all lifetimes as equal, effectively</p>



<a name="182989475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989475">(Dec 09 2019 at 19:18)</a>:</h4>
<p><em>anyway</em>, I can go more into that in a sec, but the same sort of problem is cropping up that causes the rust-analyzer infinite loop</p>



<a name="182989581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989581">(Dec 09 2019 at 19:19)</a>:</h4>
<p>Ok, on laptop now</p>



<a name="182989628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989628">(Dec 09 2019 at 19:20)</a>:</h4>
<p>Can you explain why this is ambiguous? <a href="https://github.com/rust-lang/chalk/blob/ba116c4d88f98358e9ff03eaa7fe84e6933fb377/tests/test/projection.rs#L454" target="_blank" title="https://github.com/rust-lang/chalk/blob/ba116c4d88f98358e9ff03eaa7fe84e6933fb377/tests/test/projection.rs#L454">https://github.com/rust-lang/chalk/blob/ba116c4d88f98358e9ff03eaa7fe84e6933fb377/tests/test/projection.rs#L454</a></p>



<a name="182989638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989638">(Dec 09 2019 at 19:20)</a>:</h4>
<p>Related?</p>



<a name="182989669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989669">(Dec 09 2019 at 19:20)</a>:</h4>
<blockquote>
<p><em>anyway</em>, I can go more into that in a sec, but the same sort of problem is cropping up that causes the rust-analyzer infinite loop</p>
</blockquote>
<p>I'm pondering this statement I made and wondering how true it is</p>



<a name="182989698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989698">(Dec 09 2019 at 19:21)</a>:</h4>
<p>in particular, if we "truncate" some of the environment and introduce inference variables</p>



<a name="182989719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989719">(Dec 09 2019 at 19:21)</a>:</h4>
<p>or really any part of the query</p>



<a name="182989729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989729">(Dec 09 2019 at 19:21)</a>:</h4>
<p>the resulting answer could include values for those variables</p>



<a name="182989772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989772">(Dec 09 2019 at 19:21)</a>:</h4>
<p>anyway what we do now is to "equate" the type that was replaced with a variable with the type that the answer gave back</p>



<a name="182989826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989826">(Dec 09 2019 at 19:22)</a>:</h4>
<p>and I was proposing that we could switch that to syntactic equality</p>



<a name="182989830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989830">(Dec 09 2019 at 19:22)</a>:</h4>
<p>but actually that seems...wrong</p>



<a name="182989871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989871">(Dec 09 2019 at 19:22)</a>:</h4>
<p>e.g., if we had a query like <code>u32: Bar&lt;i32&gt;</code> (say) and we chose to truncate that to <code>u32: Bar&lt;?T&gt;</code></p>



<a name="182989917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989917">(Dec 09 2019 at 19:23)</a>:</h4>
<p>and then (from some impl) we get a result like <code>?T := &lt;vec::IntoIter&lt;i32&gt; as Iterator&gt;::Item</code></p>



<a name="182989941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182989941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182989941">(Dec 09 2019 at 19:23)</a>:</h4>
<p>we'd prefer to determine that those are equal</p>



<a name="182990024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990024">(Dec 09 2019 at 19:24)</a>:</h4>
<blockquote>
<p>e.g., if we had a query like <code>u32: Bar&lt;i32&gt;</code> (say) and we chose to truncate that to <code>u32: Bar&lt;?T&gt;</code></p>
</blockquote>
<p>this is the core mechanism of what we're doing, in case that wasn't clear; the assumption is that we can replace parts of the input with variables and that the solver will cope with that, though it may generate ambiguity where there was none before</p>



<a name="182990047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990047">(Dec 09 2019 at 19:24)</a>:</h4>
<blockquote>
<p>Can you explain why this is ambiguous? <a href="https://github.com/rust-lang/chalk/blob/ba116c4d88f98358e9ff03eaa7fe84e6933fb377/tests/test/projection.rs#L454" target="_blank" title="https://github.com/rust-lang/chalk/blob/ba116c4d88f98358e9ff03eaa7fe84e6933fb377/tests/test/projection.rs#L454">https://github.com/rust-lang/chalk/blob/ba116c4d88f98358e9ff03eaa7fe84e6933fb377/tests/test/projection.rs#L454</a></p>
</blockquote>
<p>anyway, about this test</p>



<a name="182990249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990249">(Dec 09 2019 at 19:25)</a>:</h4>
<p>Why aren't we just leaving the <code>i32</code> there? Wouldn't that make solving easier?</p>



<a name="182990260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990260">(Dec 09 2019 at 19:25)</a>:</h4>
<p>that ambiguity is not necessary, no, and I spent some time writing about various ways we might fix it in an issue somewhere</p>



<a name="182990304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990304">(Dec 09 2019 at 19:26)</a>:</h4>
<blockquote>
<p>Why aren't we just leaving the <code>i32</code> there? Wouldn't that make solving easier?</p>
</blockquote>
<p>we do this when types get too big</p>



<a name="182990319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990319">(Dec 09 2019 at 19:26)</a>:</h4>
<p>in <em>principle</em> we can do it anywhere we like</p>



<a name="182990322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990322">(Dec 09 2019 at 19:26)</a>:</h4>
<p>it's been a bit, so I can't remember the exact details of how the infinite loop happens (though I did make a comment about it on the issue)</p>



<a name="182990341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990341">(Dec 09 2019 at 19:26)</a>:</h4>
<p>the infinite loop arises because</p>



<a name="182990363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990363">(Dec 09 2019 at 19:26)</a>:</h4>
<p>we have an input like <code>Foo: Bar&lt;&lt;T as Iterator&gt;::Item&gt;</code></p>



<a name="182990377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990377">(Dec 09 2019 at 19:26)</a>:</h4>
<p>we replace it with <code>Foo: Bar&lt;?X&gt;</code></p>



<a name="182990396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990396">(Dec 09 2019 at 19:27)</a>:</h4>
<p>it turns out that the query results in an answer where we just have <code>?X</code> unconstrained --</p>



<a name="182990424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990424">(Dec 09 2019 at 19:27)</a>:</h4>
<p>in particular we get back a mapping like <code>forall&lt;?Y&gt; [ ?X := ?Y ]</code></p>



<a name="182990437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990437">(Dec 09 2019 at 19:27)</a>:</h4>
<p>I don't think that's what's happening with this issue</p>



<a name="182990442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990442">(Dec 09 2019 at 19:27)</a>:</h4>
<p>to process this answer, we create a fresh inference variable for <code>?Y</code> and then we equate the "old type" with it</p>



<a name="182990450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990450">(Dec 09 2019 at 19:27)</a>:</h4>
<p>so we have to prove that <code>&lt;T as Iterator&gt;::Item = ?Y</code> for this fresh variable</p>



<a name="182990457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990457">(Dec 09 2019 at 19:27)</a>:</h4>
<p>that in turn generates a new obligation for us to prove</p>



<a name="182990458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990458">(Dec 09 2019 at 19:27)</a>:</h4>
<p>in never leaves that <code>loop</code></p>



<a name="182990465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990465">(Dec 09 2019 at 19:27)</a>:</h4>
<p>but that <em>new</em> obligation <em>also</em> has an environment that is too big</p>



<a name="182990469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990469">(Dec 09 2019 at 19:27)</a>:</h4>
<p>i.e., it has the same environment we started with</p>



<a name="182990511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990511">(Dec 09 2019 at 19:28)</a>:</h4>
<p>which then gets truncated again, starting us back on this cycle</p>



<a name="182990526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990526">(Dec 09 2019 at 19:28)</a>:</h4>
<p>one way to side-step this <em>particular</em> case would be</p>



<a name="182990540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990540">(Dec 09 2019 at 19:28)</a>:</h4>
<p>to recognize that if you have a variable in the answer that only appears once, it's meaningless</p>



<a name="182990547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990547">(Dec 09 2019 at 19:28)</a>:</h4>
<blockquote>
<p>I don't think that's what's happening with this issue</p>
</blockquote>
<p>pretty sure it is</p>



<a name="182990558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990558">(Dec 09 2019 at 19:28)</a>:</h4>
<p>but not 100% sure :)</p>



<a name="182990563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990563">(Dec 09 2019 at 19:28)</a>:</h4>
<p>at least, that's what I observed when last I looked at it</p>



<a name="182990567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990567">(Dec 09 2019 at 19:28)</a>:</h4>
<p>maybe there are two problems?</p>



<a name="182990603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990603">(Dec 09 2019 at 19:29)</a>:</h4>
<p>in any case, the fix  that I did in <em>my</em> branch was to say that if you have</p>



<a name="182990611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990611">(Dec 09 2019 at 19:29)</a>:</h4>
<p>let me look over your comments once more real quickly</p>



<a name="182990612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990612">(Dec 09 2019 at 19:29)</a>:</h4>
<p>&lt;T as Iterator&gt;::Item = ?Y and ?Y is unconstrained,</p>



<a name="182990623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990623">(Dec 09 2019 at 19:29)</a>:</h4>
<p>it might be right just reading it wrong</p>



<a name="182990624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990624">(Dec 09 2019 at 19:29)</a>:</h4>
<p>you can just equate <code>?T</code> with <code>&lt;T as Iterator&gt;::Item</code> (i.e., the unnormalized form)</p>



<a name="182990629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990629">(Dec 09 2019 at 19:29)</a>:</h4>
<p>I dont' think this is <em>wrong</em></p>



<a name="182990651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990651">(Dec 09 2019 at 19:29)</a>:</h4>
<p>but I think we used to have an invariant that we never unified a variable with an unnormalized projection</p>



<a name="182990674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990674">(Dec 09 2019 at 19:29)</a>:</h4>
<p>this might in turn be useful for things like being more specific about what impls we want</p>



<a name="182990731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990731">(Dec 09 2019 at 19:30)</a>:</h4>
<p>your fix was just to avoid truncating the environment</p>



<a name="182990743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990743">(Dec 09 2019 at 19:30)</a>:</h4>
<p>that also seems "ok for now"</p>



<a name="182990748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990748">(Dec 09 2019 at 19:30)</a>:</h4>
<p>yes, that's right</p>



<a name="182990766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990766">(Dec 09 2019 at 19:30)</a>:</h4>
<p>my only hesitation was that, in general, we might move to a place where the environment can contain more variables</p>



<a name="182990778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990778">(Dec 09 2019 at 19:30)</a>:</h4>
<p>but today in Rust it doesn't really happen and maybe we just cross that bridge when we come to it</p>



<a name="182990793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990793">(Dec 09 2019 at 19:31)</a>:</h4>
<p>I think if we are going to do one of the two fixes I might prefer yours :)</p>



<a name="182990804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990804">(Dec 09 2019 at 19:31)</a>:</h4>
<p>it feels a bit more limited</p>



<a name="182990823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990823">(Dec 09 2019 at 19:31)</a>:</h4>
<p>that was my thought</p>



<a name="182990853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990853">(Dec 09 2019 at 19:31)</a>:</h4>
<p>we can always have a pending FIXME explaining the motivation and then considering other alternatives later as we've made progress elsewhere</p>



<a name="182990857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990857">(Dec 09 2019 at 19:31)</a>:</h4>
<p>ok, I'm convinced</p>



<a name="182990863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990863">(Dec 09 2019 at 19:31)</a>:</h4>
<p>I can land that PR</p>



<a name="182990923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990923">(Dec 09 2019 at 19:32)</a>:</h4>
<p>though definitely file a followup issue so we eventually try to write a test to break it again</p>



<a name="182990947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990947">(Dec 09 2019 at 19:32)</a>:</h4>
<p>Jack's solution feels like we're doing a fix for the symptom and not the problem, while niko's fix feels like a fix for a specific instance of a more general problem</p>



<a name="182990966"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990966" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990966">(Dec 09 2019 at 19:32)</a>:</h4>
<p>Basically, yeah</p>



<a name="182990987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182990987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182990987">(Dec 09 2019 at 19:33)</a>:</h4>
<blockquote>
<p>Jack's solution feels like we're doing a fix for the symptom and not the problem, while niko's fix feels like a fix for a specific instance of a more general problem</p>
</blockquote>
<p>yeah</p>



<a name="182991021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991021">(Dec 09 2019 at 19:33)</a>:</h4>
<p>I'd rather treat the problem but I think we don't <em>quite</em> know how yet</p>



<a name="182991038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991038">(Dec 09 2019 at 19:33)</a>:</h4>
<p>I guess in particular hm</p>



<a name="182991056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991056">(Dec 09 2019 at 19:33)</a>:</h4>
<p>It's definitely going to overlap with <a href="https://github.com/rust-lang/rust/issues/234" target="_blank" title="https://github.com/rust-lang/rust/issues/234">#234</a> though</p>



<a name="182991063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991063">(Dec 09 2019 at 19:33)</a>:</h4>
<p>I wonder if the only bad scenario is this case where the answer actually gave back no real information</p>



<a name="182991067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991067">(Dec 09 2019 at 19:34)</a>:</h4>
<p>perhaps, perhaps not</p>



<a name="182991111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991111">(Dec 09 2019 at 19:34)</a>:</h4>
<p>that's the thing I'm not quite sure of :)</p>



<a name="182991167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991167">(Dec 09 2019 at 19:34)</a>:</h4>
<p>fair enough</p>



<a name="182991432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991432">(Dec 09 2019 at 19:37)</a>:</h4>
<p>Anyway, I agree that Jack's fix is the way to go for now, since we're not sure yet how to fix the problem, or where else it will pop up. The only danger is that we introduce special cases which we might forget to remove after the problem is fixed</p>



<a name="182991524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991524">(Dec 09 2019 at 19:38)</a>:</h4>
<blockquote>
<p>that ambiguity is not necessary, no, and I spent some time writing about various ways we might fix it in an issue somewhere</p>
</blockquote>
<p>so, it should be <code>unique</code> ideally?</p>



<a name="182991538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991538">(Dec 09 2019 at 19:38)</a>:</h4>
<p>Yes. I think the question though is</p>



<a name="182991541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991541">(Dec 09 2019 at 19:38)</a>:</h4>
<p>where to detect that</p>



<a name="182991554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991554">(Dec 09 2019 at 19:38)</a>:</h4>
<p>I have so far been leaning towards making this the job of the "anti-unifier"</p>



<a name="182991564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991564">(Dec 09 2019 at 19:38)</a>:</h4>
<p>though in some ways it seems suboptimal</p>



<a name="182991571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991571">(Dec 09 2019 at 19:38)</a>:</h4>
<p>I guess I might as well walk through a bit what's going on there</p>



<a name="182991579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991579">(Dec 09 2019 at 19:39)</a>:</h4>
<p>since we have been chatting this much anyway :)</p>



<a name="182991588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991588">(Dec 09 2019 at 19:39)</a>:</h4>
<p>or should we keep it for a dedicated meeting?</p>



<a name="182991605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991605">(Dec 09 2019 at 19:39)</a>:</h4>
<p>I guess I can give the short version for now</p>



<a name="182991622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991622">(Dec 09 2019 at 19:39)</a>:</h4>
<p>I wouldn't mind walking through it</p>



<a name="182991632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991632">(Dec 09 2019 at 19:39)</a>:</h4>
<p>on my branches, I've actually gotten the to be unique</p>



<a name="182991633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991633">(Dec 09 2019 at 19:39)</a>:</h4>
<p>basically the problem is that, in general, there are two ways to deal with "projections". You can either think about them as <em>placeholders</em> or you can normalize them.</p>



<a name="182991678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991678">(Dec 09 2019 at 19:40)</a>:</h4>
<p>Sometimes you only have one route available</p>



<a name="182991679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991679">(Dec 09 2019 at 19:40)</a>:</h4>
<p>though, I'm running into issues with the AntiUnifier</p>



<a name="182991686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991686">(Dec 09 2019 at 19:40)</a>:</h4>
<p>e.g., <code>forall&lt;T&gt; { if (T: Iterator) { ... } }</code></p>



<a name="182991690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991690">(Dec 09 2019 at 19:40)</a>:</h4>
<p>it's <em>too</em> dumb</p>



<a name="182991703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991703">(Dec 09 2019 at 19:40)</a>:</h4>
<p>in there, if you have a type <code>T::Item</code></p>



<a name="182991713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991713">(Dec 09 2019 at 19:40)</a>:</h4>
<p>or, more accurately, <code>&lt;T as Iterator&gt;::Item</code></p>



<a name="182991741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991741">(Dec 09 2019 at 19:41)</a>:</h4>
<p>there is really only one option for it, which is to think of it as a placeholder</p>



<a name="182991749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991749">(Dec 09 2019 at 19:41)</a>:</h4>
<p>in chalk we model this as a kind of "applicative" type</p>



<a name="182991758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991758">(Dec 09 2019 at 19:41)</a>:</h4>
<p>you might sometimes see <code>(Iterator::Item)&lt;T&gt;</code></p>



<a name="182991761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991761">(Dec 09 2019 at 19:41)</a>:</h4>
<p>that is kind of the "placeholder" for <code>&lt;T as Iterator&gt;::Item</code></p>



<a name="182991767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991767">(Dec 09 2019 at 19:41)</a>:</h4>
<p>it means "whatever the item type of <code>T</code> is"</p>



<a name="182991786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991786">(Dec 09 2019 at 19:41)</a>:</h4>
<p>the other option is that, if you can find an impl, you can normalize it</p>



<a name="182991836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991836">(Dec 09 2019 at 19:42)</a>:</h4>
<p>so e.g. <code>&lt;vec::IntoIter&lt;i32&gt; as Iterator&gt;::Item</code> can be normalized to <code>i32</code></p>



<a name="182991872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991872">(Dec 09 2019 at 19:42)</a>:</h4>
<p>and of course sometimes we have information from our environment; in Rust notation, <code>where T: Iterator&lt;Item = u32&gt;</code></p>



<a name="182991910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991910">(Dec 09 2019 at 19:43)</a>:</h4>
<p>anyway what we do in the <em>compiler</em> is to kind of have a "normalization" function that that tries to find an impl etc and falls back to the placeholder</p>



<a name="182991917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991917">(Dec 09 2019 at 19:43)</a>:</h4>
<p>that is kind of an "if (...) else if (...)"</p>



<a name="182991922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991922">(Dec 09 2019 at 19:43)</a>:</h4>
<p>this is not something that "plain logic" can model very well</p>



<a name="182991950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991950">(Dec 09 2019 at 19:44)</a>:</h4>
<p>so in chalk what we have more like two possible rules, one that says "normalize from an impl" and one that says "use the placeholder"</p>



<a name="182991984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182991984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182991984">(Dec 09 2019 at 19:44)</a>:</h4>
<p>but this also means you get back two possible answers</p>



<a name="182992027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992027">(Dec 09 2019 at 19:44)</a>:</h4>
<p>in principle we could introduce some "cuts" or other things to kind of try one alterantive and -- if it fails -- try the other</p>



<a name="182992048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992048">(Dec 09 2019 at 19:45)</a>:</h4>
<p>but I'm a bit nervous about it</p>



<a name="182992080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992080">(Dec 09 2019 at 19:45)</a>:</h4>
<p>That seems like a big step</p>



<a name="182992084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992084">(Dec 09 2019 at 19:45)</a>:</h4>
<p>there are some complex scenarios but also</p>



<a name="182992118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992118">(Dec 09 2019 at 19:45)</a>:</h4>
<p>there are times when you have recursion during normalization, at least you can -- I'd like to dig a more into rustc to help spell out some of the scenarios where I remember this cropping up</p>



<a name="182992167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992167">(Dec 09 2019 at 19:46)</a>:</h4>
<p>but suffice to say if we added cuts, we also have to address the question of cycles</p>



<a name="182992187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992187">(Dec 09 2019 at 19:46)</a>:</h4>
<p>e.g., if we are in the process of solving <code>Normalize(&lt;T as Iterator&gt;::Item = ?U)</code> and we wind up needing to solve that same query recursively --</p>



<a name="182992198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992198">(Dec 09 2019 at 19:46)</a>:</h4>
<p>does that mean we "failed to normalize"? and hence we can fallback to the placeholder?</p>



<a name="182992211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992211">(Dec 09 2019 at 19:47)</a>:</h4>
<p>but if we fallback then, what about the <em>outer</em> <code>Normalize</code> goal -- it may still succeed</p>



<a name="182992218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992218">(Dec 09 2019 at 19:47)</a>:</h4>
<p>and now we had a kind of inconsistency</p>



<a name="182992252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992252">(Dec 09 2019 at 19:47)</a>:</h4>
<p>This is why I was curious to see whether we could keep the current structure, which is naive but clear</p>



<a name="182992258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992258">(Dec 09 2019 at 19:47)</a>:</h4>
<p>but the problem with the current one is:</p>



<a name="182992264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992264">(Dec 09 2019 at 19:47)</a>:</h4>
<ul>
<li>it produces two answers, maybe we can resolve that at the outer levels</li>
</ul>



<a name="182992265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992265">(Dec 09 2019 at 19:47)</a>:</h4>
<p>but also</p>



<a name="182992278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992278">(Dec 09 2019 at 19:47)</a>:</h4>
<ul>
<li>internally there may be cases where it produces two answers, meaning we may be doing "twice as much work" in some cases</li>
</ul>



<a name="182992315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992315">(Dec 09 2019 at 19:48)</a>:</h4>
<p>So, what I've been trying out locally is instead keeping track of basically what a projection "normalizes to" in the answer itself</p>



<a name="182992326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992326">(Dec 09 2019 at 19:48)</a>:</h4>
<p>(maybe this doesn't show up at the outer levels as two answers)</p>



<a name="182992403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992403">(Dec 09 2019 at 19:49)</a>:</h4>
<p>(side note: One of the things I had hoped to be true of chalk is that it let us kind of unify "normalizations" and other kinds of goals into one framework; that may just not work out as I had hoped, but oh well)</p>



<a name="182992422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992422">(Dec 09 2019 at 19:49)</a>:</h4>
<blockquote>
<p>So, what I've been trying out locally is instead keeping track of basically what a projection "normalizes to" in the answer itself</p>
</blockquote>
<p>say a bit more</p>



<a name="182992433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992433">(Dec 09 2019 at 19:49)</a>:</h4>
<p>sure</p>



<a name="182992528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992528">(Dec 09 2019 at 19:50)</a>:</h4>
<p>hold on, gonna try to find the test I'm thinking of</p>



<a name="182992546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992546">(Dec 09 2019 at 19:50)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/blob/ba116c4d88f98358e9ff03eaa7fe84e6933fb377/tests/test/projection.rs#L123" target="_blank" title="https://github.com/rust-lang/chalk/blob/ba116c4d88f98358e9ff03eaa7fe84e6933fb377/tests/test/projection.rs#L123">https://github.com/rust-lang/chalk/blob/ba116c4d88f98358e9ff03eaa7fe84e6933fb377/tests/test/projection.rs#L123</a></p>



<a name="182992586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992586">(Dec 09 2019 at 19:51)</a>:</h4>
<p>So, here the answers that we get back today are <code>(Trait1::Type)&lt;S&gt;</code> and <code>u32</code></p>



<a name="182992612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992612">(Dec 09 2019 at 19:51)</a>:</h4>
<p>And the aggregator can't aggregate these</p>



<a name="182992694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992694">(Dec 09 2019 at 19:52)</a>:</h4>
<p>instead, the answers could be <code>(Trait1::Type)&lt;S&gt;</code> (the unnormalized placeholder) and <code>(Trait1::Type)&lt;S&gt; as u32</code> (the normalized type)</p>



<a name="182992705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992705">(Dec 09 2019 at 19:52)</a>:</h4>
<p>Then the aggregator can aggregate these</p>



<a name="182992732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992732">(Dec 09 2019 at 19:52)</a>:</h4>
<p>Which, this doesn't seem too effective alone</p>



<a name="182992766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992766">(Dec 09 2019 at 19:53)</a>:</h4>
<p>But you can also think about the case where there may be multiple answers (not just one)</p>



<a name="182992769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992769">(Dec 09 2019 at 19:53)</a>:</h4>
<p>yeah so I was imaining just having the aggregator see</p>



<a name="182992779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992779">(Dec 09 2019 at 19:53)</a>:</h4>
<p>if there are two types, and one of them is a placeholder</p>



<a name="182992796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992796">(Dec 09 2019 at 19:53)</a>:</h4>
<p>it can go ahead and try to normalize the placeholder to the other type</p>



<a name="182992806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992806">(Dec 09 2019 at 19:53)</a>:</h4>
<p>if that succeeds, it can discard the placeholder</p>



<a name="182992818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992818">(Dec 09 2019 at 19:53)</a>:</h4>
<p>but i'm not sure how easy that would be to do in practice :)</p>



<a name="182992838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992838">(Dec 09 2019 at 19:54)</a>:</h4>
<p>this would however be a boolean query</p>



<a name="182992878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992878">(Dec 09 2019 at 19:54)</a>:</h4>
<p>it would have at most one answer, in other words</p>



<a name="182992886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992886">(Dec 09 2019 at 19:54)</a>:</h4>
<p>So, so you have <code>(Trait1::Type)&lt;S&gt; as u32</code> and <code>(Trait1::Type)&lt;T&gt; as i32</code></p>



<a name="182992920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992920">(Dec 09 2019 at 19:54)</a>:</h4>
<p>sure, that can happen, but that's ok</p>



<a name="182992925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992925">(Dec 09 2019 at 19:54)</a>:</h4>
<p>those are distinct types</p>



<a name="182992945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992945">(Dec 09 2019 at 19:54)</a>:</h4>
<p>the aggregator could change this to <code>(Trait1::Type)&lt;?0&gt;</code></p>



<a name="182992985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992985">(Dec 09 2019 at 19:55)</a>:</h4>
<p>(I wrote an actually test in one my branches, but a bit distracted, so I'll have to find it later)</p>



<a name="182992999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182992999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182992999">(Dec 09 2019 at 19:55)</a>:</h4>
<p>I guess I'm nervous about tracking the normalization this way</p>



<a name="182993007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993007">(Dec 09 2019 at 19:55)</a>:</h4>
<p>though I'm trying to put my finger on why</p>



<a name="182993028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993028">(Dec 09 2019 at 19:55)</a>:</h4>
<p>That's fair enough</p>



<a name="182993079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993079">(Dec 09 2019 at 19:56)</a>:</h4>
<p>I was going to say that I don't like to have multiple equal representations or a type, but of course we do today, which is sort of the whole problem</p>



<a name="182993094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993094">(Dec 09 2019 at 19:56)</a>:</h4>
<p>I guess also i'm not sure I see that it solves the underlying challenge</p>



<a name="182993095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993095">(Dec 09 2019 at 19:56)</a>:</h4>
<p>I've also played with removing the placeholder type entirely</p>



<a name="182993150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993150">(Dec 09 2019 at 19:56)</a>:</h4>
<p>( or at least not in a <em>better</em> way that having the aggregator do a normalization query, though I should try to determine what I mean by "better" there )</p>



<a name="182993167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993167">(Dec 09 2019 at 19:56)</a>:</h4>
<p>that said, there are some other alterantvies</p>



<a name="182993189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993189">(Dec 09 2019 at 19:57)</a>:</h4>
<p>for example, there's a paper that aims to handle normalization in a haskell context</p>



<a name="182993199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993199">(Dec 09 2019 at 19:57)</a>:</h4>
<p>I saw that</p>



<a name="182993219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993219">(Dec 09 2019 at 19:57)</a>:</h4>
<p>I think that amounts to taking more the approach I was outlining in the beginning, at least from what I glean so far from reading and pondering it</p>



<a name="182993238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993238">(Dec 09 2019 at 19:57)</a>:</h4>
<p>basically trying to make normalization be more of a function that converts things to a canonical form</p>



<a name="182993251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993251">(Dec 09 2019 at 19:57)</a>:</h4>
<p>How would the aggregator handle <code>(Trait1::Type)&lt;S&gt;</code> <code>u32</code> <code>(Trait1::Type)&lt;T&gt;</code> <code>i32</code></p>



<a name="182993309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993309">(Dec 09 2019 at 19:58)</a>:</h4>
<p>especially if <code>u32</code> and <code>i32</code> came first?</p>



<a name="182993322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993322">(Dec 09 2019 at 19:58)</a>:</h4>
<p>it would just give <code>?X</code></p>



<a name="182993324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993324">(Dec 09 2019 at 19:58)</a>:</h4>
<p>(since order isn't specified)</p>



<a name="182993326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993326">(Dec 09 2019 at 19:58)</a>:</h4>
<p>but that seems ok</p>



<a name="182993351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993351">(Dec 09 2019 at 19:58)</a>:</h4>
<p>I am not convinced we <em>should</em> handle that case, I guess</p>



<a name="182993371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993371">(Dec 09 2019 at 19:58)</a>:</h4>
<p>let me see if I can find the test case</p>



<a name="182993378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993378">(Dec 09 2019 at 19:58)</a>:</h4>
<p>in particular that's a kind of weird answer</p>



<a name="182993408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993408">(Dec 09 2019 at 19:58)</a>:</h4>
<p>it's saying "the answer is some <code>Type</code> projected from <em>something</em> (but I don't know what)"</p>



<a name="182993413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993413">(Dec 09 2019 at 19:59)</a>:</h4>
<p>that maybe true for some values of something</p>



<a name="182993436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993436">(Dec 09 2019 at 19:59)</a>:</h4>
<p>but likely not all</p>



<a name="182993459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993459">(Dec 09 2019 at 19:59)</a>:</h4>
<p>and it is sort of not... <em>required</em> to project <code>Type</code> from something to reach that answer, right?</p>



<a name="182993493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993493">(Dec 09 2019 at 19:59)</a>:</h4>
<p>in other words, the aggregator is supposed to be giving back things that are "required" -- the only query that could succeed would be one that included these components</p>



<a name="182993496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993496">(Dec 09 2019 at 19:59)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/compare/master...jackh726:associated_types#diff-055bea933f4bb1135dd71fa066e5d457R1301" target="_blank" title="https://github.com/rust-lang/chalk/compare/master...jackh726:associated_types#diff-055bea933f4bb1135dd71fa066e5d457R1301">https://github.com/rust-lang/chalk/compare/master...jackh726:associated_types#diff-055bea933f4bb1135dd71fa066e5d457R1301</a></p>



<a name="182993512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993512">(Dec 09 2019 at 19:59)</a>:</h4>
<p>this is a bit of a weird case because the two things are kind of aliases for one another</p>



<a name="182993639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993639">(Dec 09 2019 at 20:00)</a>:</h4>
<p>( yeah, I guess I feel ok with coming back with <code>?</code> in that case )</p>



<a name="182993661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993661">(Dec 09 2019 at 20:01)</a>:</h4>
<p>but it is somewhat interesting</p>



<a name="182993710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993710">(Dec 09 2019 at 20:01)</a>:</h4>
<p>So with that test, you could give back<code>?0 = ^0, ?1 = (Trait1::Type)&lt;^0&gt;</code></p>



<a name="182993769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993769">(Dec 09 2019 at 20:02)</a>:</h4>
<p>ok, we're at the end of an hour, but this was a good intro, let's dive deeper next time, in the meantime I want to push a bit more on that hackmd :P -- also, I'd like to merge your PR <span class="user-mention" data-user-id="232957">@Jack Huey</span>, though I think I want to add my test case to it</p>



<a name="182993786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993786">(Dec 09 2019 at 20:02)</a>:</h4>
<p>yeah I have to go</p>



<a name="182993799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993799">(Dec 09 2019 at 20:02)</a>:</h4>
<p>I added the test :)</p>



<a name="182993817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993817">(Dec 09 2019 at 20:02)</a>:</h4>
<p>We can make a hackmd for this</p>



<a name="182993823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993823">(Dec 09 2019 at 20:02)</a>:</h4>
<p>I'll also link my branches for later</p>



<a name="182993829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993829">(Dec 09 2019 at 20:02)</a>:</h4>
<p>(or in the hackmd)</p>



<a name="182993874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993874">(Dec 09 2019 at 20:03)</a>:</h4>
<p>Can one of you link that paper as well?</p>



<a name="182993911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993911">(Dec 09 2019 at 20:03)</a>:</h4>
<p><a href="https://hackmd.io/nQyCMpIvTQe5DsC90qFSKg" target="_blank" title="https://hackmd.io/nQyCMpIvTQe5DsC90qFSKg">hackmd for normalization, next meeting</a></p>



<a name="182993924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182993924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182993924">(Dec 09 2019 at 20:03)</a>:</h4>
<p>feel free to add notes there etc</p>



<a name="182994076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182994076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182994076">(Dec 09 2019 at 20:05)</a>:</h4>
<p>I'll add the paper</p>



<a name="182994188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182994188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182994188">(Dec 09 2019 at 20:06)</a>:</h4>
<p>Another thought for next week is if we actually need <code>Normalize</code> or if we can get away with just <code>ProjectionEq</code>. They seem redundant.</p>



<a name="182994384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202019.12.09/near/182994384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202019.2E12.2E09.html#182994384">(Dec 09 2019 at 20:08)</a>:</h4>
<p>Yeah, I'm trying to remember why we have both. I don't think they're redundant but they may be. When we introducd these changes we had a different solver than was less general, and we may have been trying to work around some of its limitations (<span class="user-mention" data-user-id="131694">@scalexm</span> may remember, but I doubt it, it was a while ago).</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>